package javacode.chapter04.exer;

import java.util.Scanner;

public class Exercise01 {
    public static void main(String[] args) {
        // 任意输入三个整数，请按大小顺序输出
        int a, b, c;
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入三个整数（以空格分隔）：");
        a = scanner.nextInt();
        b = scanner.nextInt();
        c = scanner.nextInt();

        if (a < b) {
            int temp = a;
            a = b;
            b = temp;
        }
        if (a < c) {
            int temp = a;
            a = c;
            c = temp;
        }
        if (b < c) {
            int temp = b;
            b = c;
            c = temp;
        }
        System.out.println("三个整数，从大到小的顺序排列输出是：" + a + ", " + b + ", " + c);
    }
}
